<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateActivityRechargesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity_recharges', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name', 190)->index()->nullable()->comment('充值活动名称');
            $table->integer('price')->nullable()->comment('充值价格:单位：分');
            $table->integer('give')->nullable()->comment('赠送价格:单位：分');
            $table->integer('status')->index()->default(1)->comment('状态 1.正常、2.禁用');
            $table->integer('start_time')->index()->default(0)->comment('开始时间戳');
            $table->integer('end_time')->index()->default(0)->comment('结束时间戳');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('activity_recharges');
    }
}
